import { RouteObject, Navigate } from "react-router-dom";

import Discover from "@/views/discover";
import Download from "@/views/download";
import Recommend from "@/views/discover/c-views/recommend";
import Ablue from "@/views/discover/c-views/ablue";
import Ranking from "@/views/discover/c-views/ranking";
import Artist from "@/views/discover/c-views/artist";
import Songs from "@/views/discover/c-views/songs";
const routes: RouteObject[] = [
  {
    path: "/",
    element: <Navigate to={"/discover"} />,
  },
  {
    path: "/discover",
    element: <Discover />,
    children: [
      {
        path: "/discover",
        element: <Navigate to={"/discover/recommend"} />,
      },

      {
        path: "/discover/recommend",
        element: <Recommend />,
      },

      {
        path: "/discover/ablue",
        element: <Ablue />,
      },

      {
        path: "/discover/ranking",
        element: <Ranking />,
      },
      {
        path: "/discover/artist",
        element: <Artist />,
      },
      {
        path: "/discover/songs",
        element: <Songs />,
      },
    ],
  },
  {
    path: "/download",
    element: <Download />,
  },
];

export default routes;
